arm64/efi: Disable secure boot if shim is in insecure mode
authorLinn Crosetto <linn@hpe.com>
Mon, 22 Feb 2016 19:54:37 +0000 (12:54 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 4 Jun 2017 02:03:01 +0000 (02:03 +0000)
commit5d9795f376dc3b7e6ecf55721bc0de4c0be94b19
tree27bfd1f37ec36249da789c05e26a2f973111eb3c
parentd8ff4c6b4421542078f33c362fbca09c0ab25916
arm64/efi: Disable secure boot if shim is in insecure mode

Port to arm64 a patch originally written by Josh Boyer for the x86 EFI
stub.

A user can manually tell the shim boot loader to disable validation of
images it loads.  When a user does this, it creates a UEFI variable called
MokSBState that does not have the runtime attribute set.  Given that the
user explicitly disabled validation, we can honor that and not enable
secure boot mode if that variable is set.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name arm64-efi-disable-secure-boot-if-shim-is-in-insecure.patch
drivers/firmware/efi/libstub/arm-stub.c